<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!doctype html>
<html>
<head>

<title>查看订单</title>
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/css/style.css"
	type="text/css" media="screen" />

<link rel="stylesheet"
	href="${pageContext.request.contextPath }/css/substyle.css"
	type="text/css" media="screen" />
</head>

<body>
	
	<p class="topbar">&nbsp;</p>
		
	 <div id="submain">
		<!-- art-header -->
			<div class="art-header">
				<div class="art-header-png"></div>
				<div class="estore">
					<h1 style="font-size:30px;margin:30px 0 10px 0;">Estore图书商城</h1> 
					<!-- art-blockcontent-body -->
					<div class="art-blockcontent-body">
						
							<form method="post" id="loginForm"
							action="${pageContext.request.contextPath}/user"><input
								type="hidden" name="method" value="login">
								<table style="margin-left:10px;">
									<tr>
										<td colspan="2"><font color='red' style="margin-top:-10px;">${requestScope["login.message"]
																	}</font>
									</td>
								</tr>
									<tr>
										<td class="login">用户名：</td>
										<td><input type="text" value="" name="username"
											id="username" /><br /></td>
								</tr>
									<tr>
										<td class="login">密码：</td>
										<td><input type="password" value="" name="password"
											id="password" /></td>
								</tr>
									<tr class="rem">
										<td colspan="2">
										    <input type="checkbox" name="remember"
											value="on" />记住用户 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											<input type="checkbox" name="autologin"
											value="on" />自动登陆</td>
								</tr>
									<tr>
										<td colspan="2"><input class="art-button" type="submit"
											name="loginbtn" value="登陆" style="margin-right:10px;"/><button class="art-button"><a
												href='${pageContext.request.contextPath}/regist.jsp' style="color:white;">注册</a></button>
									    </td>
									   
								
									</tr>
							</table></form>
					
					

				</div> 
				<!-- art-blockcontent-body -->
			
			</div>
		</div> 
		<!-- art-header -->
		<div align="center" id="cart">
		
	    <table border="1" class="maintable">
		<tr style="background:#87520E;color:white;line-height:40px;font-size:18px;border:#87520E solid 1px;">
			<td>订单编号</td>
			<td>订单信息</td>
			<td>订单状态</td>
			<td>订单用户</td>
			<td>订单操作</td>
		</tr>


		<c:forEach items="${orders}" var="order">
			<tr>
				<td width="33%">${order.id }</td>
				<td width="33%">
					<table border="1" style="border-collapse: collapse;border:#f8e49b;width:100%;">
						<tr style="background:#87520E;color:white;line-height:35x;border:white solid 1px;w">
							<td width="26%" style="text-align:center;">商品名称</td>
							<td width="26%" style="text-align:center;">商品单价</td>
							<td width="24%" style="text-align:center;">购买数量</td>
							<td style="text-align:center;">总价</td>
						</tr>

						<c:forEach items="${order.orderItems}" var="item">
							<tr>
								<td>${item.name }</td>
								<td>${item.price }</td>
								<td>${item.buynum }</td>
								<td>${order.money}</td>
							</tr>
						</c:forEach>

					</table>
			    </td>
			<td><c:if test="${order.paystate==0}">
					<a
						href='${pageContext.request.contextPath}/pay.jsp?id=${order.id}&money=${order.money}'>未支付</a>
				</c:if> <c:if test="${order.paystate==1}">
						已支付
					</c:if></td>
			<td>${order.username}【${order.nickname}】</td>

			<td><a
				href="${pageContext.request.contextPath}/order?method=del&id=${order.id}">取消订单</a>
			</td>
			
		</c:forEach>
		</tr>
	</table>
	</div>
	
	
	
	<div id="subart">
	<!-- sideleft -->
	   <div id="sideleft" style="min-height:600px !important;float:left;">
			
	       
					<h3>最新图书</h3>
					
						<ul>
							<li><img src="images/star.png" height="22" width="24" />&nbsp;&nbsp;<a
								href="#">告白与告别</a></li>
							<li><img src="images/star.png" height="22" width="24" />&nbsp;&nbsp;<a
								href="#">如果我能说了算</a></li>
							<li><img src="images/star.png" height="22" width="24" />&nbsp;&nbsp;<a
								href="#">最遥远的距离</a></li>
							<li><img src="images/star.png" height="22" width="24" />&nbsp;&nbsp;<a
								href="#">从你的世界经过从你的世界经过从你的世界经过</a></li>
							<li><img src="images/star.png" height="22" width="24" />&nbsp;&nbsp;<a
								href="#">再美也美不过想象</a></li>
							<li><img src="images/star.png" height="22" width="24" />&nbsp;&nbsp;<a
								href="#">愿有人陪你颠沛流离</a></li>
							<li><img src="images/star.png" height="22" width="24" />&nbsp;&nbsp;<a
								href="#">笑猫日记</a></li>
							<li><img src="images/star.png" height="22" width="24" />&nbsp;&nbsp;<a
								href="#">再美也美不过想象</a></li>
							<li><img src="images/star.png" height="22" width="24" />&nbsp;&nbsp;<a
								href="#">愿有人陪你颠沛流离</a></li>
							<li><img src="images/star.png" height="22" width="24" />&nbsp;&nbsp;<a
								href="#">笑猫日记</a></li>
					</ul>
				
		</div> 
		<!-- sideleft -->
		
		
		<!-- floatpart -->
		<div id="floatpart">
		      <h3 class="com" style="margin-bottom:10px;">可能喜欢</h3>
		      <div class="marside">
		            <figure>
		                <img src="images/book.png" width="139" height="115">
		                <figcaption>如果我能说了算</figcaption>
		                <span><a href="#">速速抢购</a></span>
		            </figure>
		            <figure>
		                <img src="images/book5.png" width="139" height="115">
		                <figcaption>如果我能说了算</figcaption>
		                <span><a href="#">速速抢购</a></span>
		            </figure>
		            <figure>
		                <img src="images/book2.png" width="139" height="115">
		                <figcaption>如果我能说了算</figcaption>
		                <span><a href="#">速速抢购</a></span>
		            </figure>
		            <figure style="margin-right:0px;">
		                <img src="images/bookname.png" width="139" height="115">
		                <figcaption>如果我能说了算</figcaption>
		                <span><a href="#">速速抢购</a></span>
		            </figure>
		      </div>
		      <div>
		            <figure>
		                <img src="images/book.png" width="139" height="115">
		                <figcaption>如果我能说了算</figcaption>
		                <span><a href="#">速速抢购</a></span>
		            </figure>
		            <figure>
		                <img src="images/book5.png" width="139" height="115">
		                <figcaption>如果我能说了算</figcaption>
		                <span><a href="#">速速抢购</a></span>
		            </figure>
		            <figure>
		                <img src="images/book2.png" width="139" height="115">
		                <figcaption>如果我能说了算</figcaption>
		                <span><a href="#">速速抢购</a></span>
		            </figure>
		            <figure style="margin-right:0px;">
		                <img src="images/bookname.png" width="139" height="115">
		                <figcaption>如果我能说了算</figcaption>
		                <span><a href="#">速速抢购</a></span>
		            </figure>
		      </div>
		      
		</div>
		<!-- floatpart -->
	</div>
     
     </div>
     
     <footer style="padding-bottom:20px;margin-top:20px;" id="footer">
        
            <div>&nbsp;</div>
            <p style="background:#87520E; height:40px;">&nbsp;</p>
    </footer>
</body>
</html>
